#include <cstdio>
#include <iostream>
using namespace std;

int main() 
{
	freopen("decrypt.in", "r", stdin);
	freopen("decrypt.out", "w", stdout);
	long long n = 0, a = 0, b = 0;
	cin >> n;
	cin >> a;
	cout << a << " ";
	for ( int i = 1; i < n; i++ ) {
		cin >> b;
		a = b - a;
		cout << a << " ";	
	}
	fclose(stdin);
	fclose(stdout);
	return 0;
}
